package com.group.itms.routes.data;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable
public class BObjectTopic {

	public static final String OBJECT = "object";
	public static final String TOPIC = "topic";

	@DatabaseField(id = true)
	private int id;

	@DatabaseField(foreign = true, foreignAutoRefresh = false, columnName = OBJECT)
	private BObject object;
	@DatabaseField(foreign = true, foreignAutoRefresh = false, columnName = TOPIC)
	private Topic topic;
	@DatabaseField
	private boolean isActive;

	public BObjectTopic() {

	}

	public BObjectTopic(BObject object, Topic topic) {
		this.object = object;
		this.topic = topic;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public BObject getObject() {
		return object;
	}

	public void setObject(BObject object) {
		this.object = object;
	}

	public Topic getTopic() {
		return topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}

	@Override
	public String toString() {
		return "ObjectTopic[object=" + object + ",topic=" + topic + "]";
	}

}
